<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>作业1</title>
</head>
<body>
    <script>
        //23-5
        //5-11
        //11-13
        //13-18
        //18-23
        var time = prompt('输入几点了');
        time = +time;
        if ( time >=23 && time <=24 || time >=0 && time < 5){
            alert('深夜好!')
        }else if (time >= 18){
            alert('晚上好!');
        }else if(time >= 13){
            alert('下午好!');
        }else if(time >= 11 ){
            alert('中午好!')
        }else if(time >= 5){
            alert('上午好!')
        }

        

        
    </script>
</body>
</html>